package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter@Setter
public class Client {
    //定义全局静态常量
    //客户状态
    //正式客户
    private static final int FORMAL_CUSTOMER = 0;
    //可开发客户
    private static final int EXPLOITABLE = 1;
    //建议转入资源池客户
    private static final int INCOMING_RESOURCE_POOL = 2;
    //资源池客户
    private static final int RESOURCES_POOL_CUSTOMERS = 3;
    //计划开发客户
    private static final int PLAN_CLIENT = 4;
    //待签单客户
    private static final int CLIENT_SIGN_BILL = 5;


    private Long id;

    //客户名
    private String name;

    //客户年龄
    private Integer age;

    //性别
    private int gender;

    //身份证号码
    private String idNumber;

    //电话号码
    private String tel;

    //微信
    private String weixin;

    //地址
    private String address;

    //客户邮箱
    private String email;

    //备注
    private String remark;

    //客户状态
    private int state = EXPLOITABLE;

    //录入时间
    //传出转成json格式
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT-8")
    //数据传入使用日期类型
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createDate;

    //负责人接手时间
    //传出转成json格式
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT-8")
    //数据传入使用日期类型
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date leadingDate;



    //下面是关联类

    //录入人
    private Employee createUser;

    //负责人
    private Employee leadingUser;



    //职业
    private DictionaryItem job;

    //收入水平
    private DictionaryItem income;

    //客户来源
    private DictionaryItem resource;

}